package nothing.dao.hibernate;

import nothing.model.Measurement;
import nothing.dao.MeasurementDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class MeasurementDaoHibernate extends GenericDaoHibernate<Measurement, Long> implements MeasurementDao {

    public MeasurementDaoHibernate() {
        super(Measurement.class);
    }

    @SuppressWarnings("unchecked")
    public List<Measurement> findByName(String name) {
        return getHibernateTemplate().find("from Measurement where name=?", name);
    }
}

